package com.hsxc.cdz.monitor.bean.pile.v1_21;

import com.hsxc.cdz.base.util.BytesUtil;

public class RateSettingPileMsg extends PileMessage {
	
	//================================================
	// 类私有属性
	private int oneRate;
	private int twoRate;
	private int threeRate;
	private int fourRate;
	private int serviceFee;
	private String timeRate;

	public static final int length = 58;

	// ================================================
	// get() and set()
	public int getOneRate() {
		return oneRate;
	}

	public void setOneRate(int oneRate) {
		this.oneRate = oneRate;
	}

	public int getTwoRate() {
		return twoRate;
	}

	public void setTwoRate(int twoRate) {
		this.twoRate = twoRate;
	}

	public int getThreeRate() {
		return threeRate;
	}

	public void setThreeRate(int threeRate) {
		this.threeRate = threeRate;
	}

	public int getFourRate() {
		return fourRate;
	}

	public void setFourRate(int fourRate) {
		this.fourRate = fourRate;
	}

	public int getServiceFee() {
		return serviceFee;
	}

	public void setServiceFee(int serviceFee) {
		this.serviceFee = serviceFee;
	}

	public String getTimeRate() {
		return timeRate;
	}

	public void setTimeRate(String timeRate) {
		this.timeRate = timeRate;
	}

	// =========================================================
	// 父类方法重写
	@Override
	public void getContentFromByte(byte[] data) {
		byte[] temp;

		temp = BytesUtil.getByte(0, 2, data);
		this.setOneRate(BytesUtil.bytesToIntDesc(temp));

		temp = BytesUtil.getByte(2, 2, data);
		this.setTwoRate(BytesUtil.bytesToIntDesc(temp));

		temp = BytesUtil.getByte(4, 2, data);
		this.setThreeRate(BytesUtil.bytesToIntDesc(temp));

		temp = BytesUtil.getByte(6, 2, data);
		this.setFourRate(BytesUtil.bytesToIntDesc(temp));

		temp = BytesUtil.getByte(8, 2, data);
		this.setServiceFee(BytesUtil.bytesToIntDesc(temp));

		temp = BytesUtil.getByte(10, 48, data);
		this.setTimeRate(BytesUtil.binBytesToStr(temp));
	}

}
